

************* REPLICATION FILE FOR APPENDIX B ***********************


*******Figure B1 Replication**************************
/* 
The analyses below all use the Combined105-116_HRC.dta file


Coarsening Choices
for nominate_d1 I have coarsened the data into four bins based on 25th, 50th and 75th percentile for each Cngress. 

The Analyses for Figure B1 includes all the Congresses, but does not match on LGB Household vote share.

*/


** Drop Barney Frank from the analysis
drop if lname=="Frank"


**105th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==105
imb nominate_d1  Demvoteshare if congress==105 , tr(LGBLegislator)
cem nominate_d1 (-0.35 .17 0.39)  Demvoteshare(30 45 55 70) if congress==105, tr(LGBLegislator)
gen T105=LGBLegislator
label variable T105 "105th Congress"
eststo cong105: reg hrc T105 nominate_d1  Demvoteshare  [iweight=cem_weights] if congress==105, robust 
estimate store cong105
outreg2 using H1NoFrank.xls, replace title("Effect of LGB Legislator") ///
label ctitle("105th Congress ")
rename (cem*) (_105_cem*)

**106th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==106 
imb nominate_d1   urban Demvoteshare democrat if congress==106 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.35 .14 0.39)   urban(5) Demvoteshare(30 45 55 70) if congress==106, tr(LGBLegislator)
gen T106=LGBLegislator
label variable T106 "106th Congress"
eststo cong106: reg hrc T106 nominate_d1   urban Demvoteshare democrat [iweight=cem_weights] if congress==106, robust
outreg2 using  H1NoFrank.xls, append title("Effect of LGB Legislator") ///
label ctitle("106th Congress ")
rename (cem*) (_106_cem*)

**107th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==107
imb nominate_d1   urban Demvoteshare  if congress==107, tr(LGBLegislator)
cem nominate_d1(-0.36 .11 0.40)   urban(5) Demvoteshare(30 45 55 70) if congress==107, tr(LGBLegislator)
gen T107=LGBLegislator
label variable T107 "107th Congress"
eststo cong107: reg  hrc T107 nominate_d1   Demvoteshare urban  [iweight=cem_weights] if congress==107, robust
outreg2 using  H1NoFrank.xls, append title("Effect of LGB Legislator") ///
label ctitle("107th Congress ")
rename (cem*) (_107_cem*)
///


**108th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==108 
imb nominate_d1   urban Demvoteshare democrat if congress==108, tr(LGBLegislator)
cem nominate_d1(-0.36 .18 0.40)   urban(5) Demvoteshare(30 45 55 70) if congress==108, tr(LGBLegislator)
gen T108=LGBLegislator
label variable T108 "108th Congress"
eststo cong108: reg hrc T108 nominate_d1 Demvoteshare urban [iweight=cem_weights] if congress==108, robust
estimates store cong108
outreg2 using  H1NoFrank.xls, append  ///
label ctitle("108th Congress ")
rename (cem*) (_108_cem*)
///

**109th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==109 & district>0
imb nominate_d1 urban Demvoteshare   if congress==109 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.36 .22 0.41)   urban(5) Demvoteshare(30 45 55 70) if congress==109, tr(LGBLegislator)
gen T109=LGBLegislator
label variable T109 "109th Congress"
eststo cong109: reg hrc T109 nominate_d1   Demvoteshare urban democrat [iweight=cem_weights] if congress==109, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("109th Congress ")
rename (cem*) (_109_cem*)
///

**110th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==110
imb nominate_d1 urban Demvoteshare  democrat if congress==110 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.36 -.15 0.4)    urban(5) Demvoteshare(30 45 55 70) if congress==110, tr(LGBLegislator)
gen T110=LGBLegislator
label variable T110 "110th Congress"
eststo cong110: reg hrc T110 nominate_d1  Demvoteshare urban [iweight=cem_weights] if congress==110, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("110th Congress ") 
rename (cem*) (_110_cem*)
///

**111th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==111
imb nominate_d1 urban   Demvoteshare  if congress==111, tr(LGBLegislator)
cem nominate_d1(-0.36 -.18 0.4)   urban(5) Demvoteshare(30 45 55 70)  if congress==111, tr(LGBLegislator)
gen T111=LGBLegislator
label variable T111 "111th Congress"
eststo cong111:reg hrc T111 nominate_d1   Demvoteshare urban  [iweight=cem_weights] if congress==111, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("111th Congress ") 
rename (cem*) (_111_cem*)
///


**112th Congress, adjust matching variables based on data availability ()
table LGBLegislator if congress==112
imb nominate_d1   urban democrat  Demvoteshare if congress==112, tr(LGBLegislator)
cem nominate_d1(-0.37 .22 0.49)    urban(5) Demvoteshare(30 45 55 70) if congress==112, tr(LGBLegislator)
gen T112=LGBLegislator
label variable T112 "112th Congress"
eststo cong112: reg hrc T112 nominate_d1  Demvoteshare urban [iweight=cem_weights] if congress==112, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("112th Congress ") 
rename (cem*) (_112_cem*)
///


**113th Congress, adjust matching variables based on data availability

table LGBLegislator if congress==113 & district>0
imb nominate_d1   urban Demvoteshare   if congress==113 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.37 .22 0.49)   urban Demvoteshare(30 45 55 70)  if congress==113, tr(LGBLegislator)
gen T113=LGBLegislator
label variable T113 "113th Congress"
eststo cong113: reg hrc T113 nominate_d1  Demvoteshare urban [iweight=cem_weights] if congress==113, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("113th Congress ") 
rename (cem*) (_113_cem*)
///


**114th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==114
imb nominate_d1   urban Demvoteshare   if congress==114, tr(LGBLegislator)
cem nominate_d1(-0.37 .28 0.51)  urban(40 80) Demvoteshare(30 45 55 70) if congress==114, tr(LGBLegislator)
gen T114=LGBLegislator
label variable T114 "114th Congress"
eststo cong114: reg hrc T114 nominate_d1   Demvoteshare urban  [iweight=cem_weights] if congress==114, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("114th Congress ") 
rename (cem*) (_114_cem*)
///

**115th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==115
imb nominate_d1 urban Demvoteshare   if congress==115 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.37 .27 0.51) urban(40 80)  Demvoteshare(30 45 55 70) if congress==115, tr(LGBLegislator)
gen T115=LGBLegislator
label variable T115 "115th Congress"
eststo cong115: reg hrc T115 nominate_d1  Demvoteshare urban  [iweight=cem_weights] if congress==115, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("115th Congress") 
rename (cem*) (_115_cem*)
///

**116th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==116
imb nominate_d1   urban Demvoteshare   if congress==116, tr(LGBLegislator)
cem nominate_d1(-0.37 -.16 0.48)   urban Demvoteshare(30 45 55 70) if congress==116, tr(LGBLegislator) 
label variable LGBLegislator cong116
gen T116=LGBLegislator
label variable T116 "116th Congress"
gen imb_match__116=r(L1)
eststo cong116: reg hrc T116 nominate_d1  Demvoteshare urban [iweight=cem_weights] if congress==116, robust
estimates store cong116
outreg2 using  H1NoFrank.xls, append ///
label ctitle("116th Congress ")
rename (cem*) (_116_cem*)
///


**All Congresses except 105th and no matching on LGB Household
quietly tabulate congress, generate(new_congress)

table LGBLegislator if congress~=105 & congress~=112
imb nominate_d1   urban Demvoteshare  congress if congress~=105 & congress~=112 , tr(LGBLegislator)
cem nominate_d1(-0.36 0.16 0.43)   urban Demvoteshare(30 45 55 70)  congress if congress~=105, tr(LGBLegislator) 
gen TAll=LGBLegislator
label variable TAll "All Congresses"
eststo AllCongress: reg hrc TAll nominate_d1 Demvoteshare urban  i.congress [iweight=cem_weights] if congress~=105 & congress~=112, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("All Congresses") 
rename (cem*) (all_cong_cem*)
///



*To Create Figure B1
coefplot   cong106 cong107 cong108 cong109 cong110 cong111 cong112 cong113  cong114 cong115 cong116 AllCongress, keep( T106 T107 T108 T109 T110 T111 T112 T113 T114 T115 T116 TAll) scheme(s1mono) xline(0) level(90) legend(off) xtitle(Estimated Coefficient for All LGB Legislator No Barney Frank)


clear


*****************Figure B2 Replication *************************
/* 


Code below creates Figure B2, which adds the LGB Household share to the matching/estimation, but requires dropping the 
Congresses before the 109th when that data was not available. 

use the Combined105-116_HRC.dta file

*/




**109th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==109 & district>0
imb nominate_d1 urban Demvoteshare LGBHousehold  if congress==109 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.36 .22 0.41) LGBHousehold  urban(5) Demvoteshare(30 45 55 70) if congress==109, tr(LGBLegislator)
gen T109=LGBLegislator
label variable T109 "109th Congress"
eststo cong109: reg hrc T109 nominate_d1  LGBHousehold Demvoteshare urban democrat [iweight=cem_weights] if congress==109, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("109th Congress ")
rename (cem*) (_109_cem*)
///

**110th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==110
imb nominate_d1 urban Demvoteshare LGBHousehold democrat if congress==110 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.36 -.15 0.4) LGBHousehold   urban(5) Demvoteshare(30 45 55 70) if congress==110, tr(LGBLegislator)
gen T110=LGBLegislator
label variable T110 "110th Congress"
eststo cong110: reg hrc T110 nominate_d1 LGBHousehold Demvoteshare urban [iweight=cem_weights] if congress==110, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("110th Congress ") 
rename (cem*) (_110_cem*)
///

**111th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==111
imb nominate_d1 urban LGBHousehold  Demvoteshare  if congress==111, tr(LGBLegislator)
cem nominate_d1(-0.36 -.18 0.4) LGBHousehold  urban(5) Demvoteshare(30 45 55 70)  if congress==111, tr(LGBLegislator)
gen T111=LGBLegislator
label variable T111 "111th Congress"
eststo cong111:reg hrc T111 nominate_d1 LGBHousehold  Demvoteshare urban  [iweight=cem_weights] if congress==111, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("111th Congress ") 
rename (cem*) (_111_cem*)
///


**112th Congress, adjust matching variables based on data availability ()
table LGBLegislator if congress==112
imb nominate_d1   urban democrat LGBHousehold Demvoteshare if congress==112, tr(LGBLegislator)
cem nominate_d1(-0.37 .22 0.49) LGBHousehold   urban(5) Demvoteshare(30 45 55 70) if congress==112, tr(LGBLegislator)
gen T112=LGBLegislator
label variable T112 "112th Congress"
eststo cong112: reg hrc T112 nominate_d1 LGBHousehold Demvoteshare urban [iweight=cem_weights] if congress==112, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("112th Congress ") 
rename (cem*) (_112_cem*)
///


**113th Congress, adjust matching variables based on data availability

table LGBLegislator if congress==113 & district>0
imb nominate_d1   urban Demvoteshare LGBHousehold  if congress==113 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.37 .22 0.49) LGBHousehold  urban Demvoteshare(30 45 55 70)  if congress==113, tr(LGBLegislator)
gen T113=LGBLegislator
label variable T113 "113th Congress"
eststo cong113: reg hrc T113 nominate_d1 LGBHousehold Demvoteshare urban [iweight=cem_weights] if congress==113, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("113th Congress ") 
rename (cem*) (_113_cem*)
///


**114th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==114
imb nominate_d1   urban Demvoteshare LGBHousehold  if congress==114, tr(LGBLegislator)
cem nominate_d1(-0.37 .28 0.51) LGBHousehold urban(40 80) Demvoteshare(30 45 55 70) if congress==114, tr(LGBLegislator)
gen T114=LGBLegislator
label variable T114 "114th Congress"
eststo cong114: reg hrc T114 nominate_d1  LGBHousehold Demvoteshare urban  [iweight=cem_weights] if congress==114, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("114th Congress ") 
rename (cem*) (_114_cem*)
///

**115th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==115
imb nominate_d1 urban Demvoteshare LGBHousehold  if congress==115 & district>0, tr(LGBLegislator)
cem nominate_d1(-0.37 .27 0.51) urban(40 80) LGBHousehold Demvoteshare(30 45 55 70) if congress==115, tr(LGBLegislator)
gen T115=LGBLegislator
label variable T115 "115th Congress"
eststo cong115: reg hrc T115 nominate_d1 LGBHousehold Demvoteshare urban  [iweight=cem_weights] if congress==115, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("115th Congress") 
rename (cem*) (_115_cem*)
///

**116th Congress, adjust matching variables based on data availability
table LGBLegislator if congress==116
imb nominate_d1   urban Demvoteshare LGBHousehold  if congress==116, tr(LGBLegislator)
cem nominate_d1(-0.37 -.16 0.48) LGBHousehold  urban Demvoteshare(30 45 55 70) if congress==116, tr(LGBLegislator) 
label variable LGBLegislator cong116
gen T116=LGBLegislator
label variable T116 "116th Congress"
gen imb_match__116=r(L1)
eststo cong116: reg hrc T116 nominate_d1 LGBHousehold Demvoteshare urban [iweight=cem_weights] if congress==116, robust
estimates store cong116
outreg2 using  H1NoFrank.xls, append ///
label ctitle("116th Congress ")
rename (cem*) (_116_cem*)
///


**Results for Figure B2 All Congresses, exclude 105-108 b/c no data on LGBHousehold and 112th missing voteshare data
table LGBLegislator if congress<109  & congress~=112
imb nominate_d1   urban Demvoteshare  congress LGBHousehold if congress>108 & congress~=112, tr(LGBLegislator)
cem nominate_d1(-0.36 0.16 0.43)   urban Demvoteshare(30 45 55 70) LGBHousehold congress if congress> 108 & congress~=112, tr(LGBLegislator) 
gen TAll=LGBLegislator
label variable TAll "AllCongresses"
eststo AllCongressLGB: reg hrc TAll nominate_d1 Demvoteshare urban LGBHousehold i.congress [iweight=cem_weights] if congress>108 & congress~=112, robust
outreg2 using  H1NoFrank.xls, append ///
label ctitle("All Congresses w/ LGB Household") 
rename (cem*) (all_cong_LGB_cem*)
///

*To Create Figure B2
coefplot    cong109 cong110 cong111 cong112 cong113  cong114 cong115 cong116 AllCongress, keep( T109 T110 T111 T112 T113 T114 T115 T116 TAll) scheme(s1mono) xline(0) level(90) legend(off) xtitle(Estimated Coefficient for All LGB Legislators No Barney Frank)


clear


